#include <iostream>
#include <string>
#include <vector>
#include <map>
using namespace std;


//https://www.nowcoder.com/practice/16f59b169d904f8898d70d81d4a140a0?tpId=94&tqId=31064&rp=
//1&ru=%2Factivity%2Foj&qru=%2Fta%2Fbit-kaoyan%2Fquestion-ranking&tPage=2
int main() {
    string s;
    getline(cin, s);
    for (auto& ch : s) {
        ch = tolower(ch);
    }
    map<string, int> m;
    string tmp;
    for (int i = 0; i < s.size(); i++) {
        if (s[i] == ' ' || s[i] == '.') {
            m[tmp]++;
            tmp.clear();
        }
        else
            tmp += s[i];
    }
    for (auto ch : m) {
        cout << ch.first << ":" << ch.second << endl;
    }
    return 0;
}
